package hardy.etudejpa;

import java.util.HashMap;
import java.util.Map;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@EnableAspectJAutoProxy
@EnableScheduling
public class EtudeRun {
	public static void main( String[] args ){
		Map<String,Object> command = new HashMap<>();
    	if(args!=null&&args.length>0) {
    		for(int i = 0;i<args.length;i+=2) {
    			command.put(args[i],args[i+1]);
    		}
    	}
		SpringApplicationBuilder app = new SpringApplicationBuilder(EtudeRun.class);
    	if(!command.isEmpty()) {
    		app.properties(command);
    	}
    	app.run(args);
    }
}
